home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / program / knobvb25.zip / VB.ZIP / KSCALES.FRM < prev    next >
Text File  |  1996-01-17  |  16KB  |  486 lines

  1. VERSION 2.00
  2. Begin Form ScaleDemo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Knob Scale Properties Demo"
  6.    ClientHeight    =   3870
  7.    ClientLeft      =   2925
  8.    ClientTop       =   3345
  9.    ClientWidth     =   8325
  10.    FontBold        =   -1  'True
  11.    FontItalic      =   0   'False
  12.    FontName        =   "Arial"
  13.    FontSize        =   8.25
  14.    FontStrikethru  =   0   'False
  15.    FontUnderline   =   0   'False
  16.    Height          =   4275
  17.    Left            =   2865
  18.    LinkTopic       =   "Form2"
  19.    MaxButton       =   0   'False
  20.    MDIChild        =   -1  'True
  21.    MinButton       =   0   'False
  22.    ScaleHeight     =   258
  23.    ScaleMode       =   3  'Pixel
  24.    ScaleWidth      =   555
  25.    Top             =   3000
  26.    Width           =   8445
  27.    Begin Frame Frame1 
  28.       BackColor       =   &H00C0C0C0&
  29.       Caption         =   "Scale Angle Properties"
  30.       FontBold        =   -1  'True
  31.       FontItalic      =   0   'False
  32.       FontName        =   "Arial"
  33.       FontSize        =   8.25
  34.       FontStrikethru  =   0   'False
  35.       FontUnderline   =   0   'False
  36.       Height          =   885
  37.       Index           =   2
  38.       Left            =   3930
  39.       TabIndex        =   18
  40.       Top             =   2835
  41.       Width           =   4275
  42.       Begin HScrollBar HScroll1 
  43.          Height          =   240
  44.          Index           =   4
  45.          Left            =   1635
  46.          Max             =   360
  47.          TabIndex        =   0
  48.          Top             =   300
  49.          Width           =   2000
  50.       End
  51.       Begin HScrollBar HScroll1 
  52.          Height          =   240
  53.          Index           =   5
  54.          Left            =   1635
  55.          Max             =   360
  56.          TabIndex        =   1
  57.          Top             =   540
  58.          Width           =   2000
  59.       End
  60.       Begin Label Label2 
  61.          AutoSize        =   -1  'True
  62.          BackStyle       =   0  'Transparent
  63.          Caption         =   "0"
  64.          Height          =   195
  65.          Index           =   4
  66.          Left            =   3735
  67.          TabIndex        =   2
  68.          Top             =   315
  69.          Width           =   120
  70.       End
  71.       Begin Label Label2 
  72.          AutoSize        =   -1  'True
  73.          BackStyle       =   0  'Transparent
  74.          Caption         =   "0"
  75.          Height          =   195
  76.          Index           =   5
  77.          Left            =   3735
  78.          TabIndex        =   3
  79.          Top             =   555
  80.          Width           =   120
  81.       End
  82.       Begin Label Label1 
  83.          AutoSize        =   -1  'True
  84.          BackStyle       =   0  'Transparent
  85.          Caption         =   "ScaleStartAngle:"
  86.          FontBold        =   0   'False
  87.          FontItalic      =   0   'False
  88.          FontName        =   "Arial"
  89.          FontSize        =   8.25
  90.          FontStrikethru  =   0   'False
  91.          FontUnderline   =   0   'False
  92.          Height          =   210
  93.          Index           =   4
  94.          Left            =   375
  95.          TabIndex        =   4
  96.          Top             =   315
  97.          Width           =   1215
  98.       End
  99.       Begin Label Label1 
  100.          AutoSize        =   -1  'True
  101.          BackStyle       =   0  'Transparent
  102.          Caption         =   "ScaleStopAngle:"
  103.          FontBold        =   0   'False
  104.          FontItalic      =   0   'False
  105.          FontName        =   "Arial"
  106.          FontSize        =   8.25
  107.          FontStrikethru  =   0   'False
  108.          FontUnderline   =   0   'False
  109.          Height          =   210
  110.          Index           =   5
  111.          Left            =   390
  112.          TabIndex        =   5
  113.          Top             =   555
  114.          Width           =   1200
  115.       End
  116.    End
  117.    Begin Frame Frame1 
  118.       BackColor       =   &H00C0C0C0&
  119.       Caption         =   "Scale Origin Properties"
  120.       FontBold        =   -1  'True
  121.       FontItalic      =   0   'False
  122.       FontName        =   "Arial"
  123.       FontSize        =   8.25
  124.       FontStrikethru  =   0   'False
  125.       FontUnderline   =   0   'False
  126.       Height          =   885
  127.       Index           =   1
  128.       Left            =   3930
  129.       TabIndex        =   17
  130.       Top             =   1875
  131.       Width           =   4275
  132.       Begin HScrollBar HScroll1 
  133.          Height          =   240
  134.          Index           =   2
  135.          Left            =   1650
  136.          Max             =   140
  137.          Min             =   -140
  138.          TabIndex        =   6
  139.          Top             =   270
  140.          Width           =   2000
  141.       End
  142.       Begin HScrollBar HScroll1 
  143.          Height          =   240
  144.          Index           =   3
  145.          Left            =   1650
  146.          Max             =   140
  147.          Min             =   -140
  148.          TabIndex        =   7
  149.          Top             =   510
  150.          Width           =   2000
  151.       End
  152.       Begin Label Label2 
  153.          AutoSize        =   -1  'True
  154.          BackStyle       =   0  'Transparent
  155.          Caption         =   "0"
  156.          Height          =   195
  157.          Index           =   2
  158.          Left            =   3750
  159.          TabIndex        =   8
  160.          Top             =   270
  161.          Width           =   120
  162.       End
  163.       Begin Label Label2 
  164.          AutoSize        =   -1  'True
  165.          BackStyle       =   0  'Transparent
  166.          Caption         =   "0"
  167.          Height          =   195
  168.          Index           =   3
  169.          Left            =   3750
  170.          TabIndex        =   9
  171.          Top             =   510
  172.          Width           =   120
  173.       End
  174.       Begin Label Label1 
  175.          AutoSize        =   -1  'True
  176.          BackStyle       =   0  'Transparent
  177.          Caption         =   "ScaleOriginX:"
  178.          FontBold        =   0   'False
  179.          FontItalic      =   0   'False
  180.          FontName        =   "Arial"
  181.          FontSize        =   8.25
  182.          FontStrikethru  =   0   'False
  183.          FontUnderline   =   0   'False
  184.          Height          =   210
  185.          Index           =   2
  186.          Left            =   615
  187.          TabIndex        =   10
  188.          Top             =   285
  189.          Width           =   975
  190.       End
  191.       Begin Label Label1 
  192.          AutoSize        =   -1  'True
  193.          BackStyle       =   0  'Transparent
  194.          Caption         =   "ScaleOriginY:"
  195.          FontBold        =   0   'False
  196.          FontItalic      =   0   'False
  197.          FontName        =   "Arial"
  198.          FontSize        =   8.25
  199.          FontStrikethru  =   0   'False
  200.          FontUnderline   =   0   'False
  201.          Height          =   210
  202.          Index           =   3
  203.          Left            =   615
  204.          TabIndex        =   11
  205.          Top             =   525
  206.          Width           =   990
  207.       End
  208.    End
  209.    Begin Frame Frame1 
  210.       BackColor       =   &H00C0C0C0&
  211.       Caption         =   "Scale Value Properties"
  212.       FontBold        =   -1  'True
  213.       FontItalic      =   0   'False
  214.       FontName        =   "Arial"
  215.       FontSize        =   8.25
  216.       FontStrikethru  =   0   'False
  217.       FontUnderline   =   0   'False
  218.       Height          =   885
  219.       Index           =   0
  220.       Left            =   3930
  221.       TabIndex        =   16
  222.       Top             =   960
  223.       Width           =   4275
  224.       Begin HScrollBar HScroll1 
  225.          Height          =   240
  226.          Index           =   0
  227.          Left            =   1665
  228.          Max             =   100
  229.          TabIndex        =   20
  230.          Top             =   300
  231.          Width           =   2000
  232.       End
  233.       Begin HScrollBar HScroll1 
  234.          Height          =   240
  235.          Index           =   1
  236.          Left            =   1665
  237.          Max             =   100
  238.          TabIndex        =   19
  239.          Top             =   540
  240.          Width           =   2000
  241.       End
  242.       Begin Label Label2 
  243.          AutoSize        =   -1  'True
  244.          BackStyle       =   0  'Transparent
  245.          Caption         =   "0"
  246.          Height          =   195
  247.          Index           =   0
  248.          Left            =   3765
  249.          TabIndex        =   24
  250.          Top             =   315
  251.          Width           =   120
  252.       End
  253.       Begin Label Label2 
  254.          AutoSize        =   -1  'True
  255.          BackStyle       =   0  'Transparent
  256.          Caption         =   "0"
  257.          Height          =   195
  258.          Index           =   1
  259.          Left            =   3765
  260.          TabIndex        =   23
  261.          Top             =   555
  262.          Width           =   120
  263.       End
  264.       Begin Label Label1 
  265.          AutoSize        =   -1  'True
  266.          BackStyle       =   0  'Transparent
  267.          Caption         =   "ScaleMaxValue:"
  268.          FontBold        =   0   'False
  269.          FontItalic      =   0   'False
  270.          FontName        =   "Arial"
  271.          FontSize        =   8.25
  272.          FontStrikethru  =   0   'False
  273.          FontUnderline   =   0   'False
  274.          Height          =   210
  275.          Index           =   0
  276.          Left            =   450
  277.          TabIndex        =   22
  278.          Top             =   315
  279.          Width           =   1170
  280.       End
  281.       Begin Label Label1 
  282.          AutoSize        =   -1  'True
  283.          BackStyle       =   0  'Transparent
  284.          Caption         =   "ScaleMinValue:"
  285.          FontBold        =   0   'False
  286.          FontItalic      =   0   'False
  287.          FontName        =   "Arial"
  288.          FontSize        =   8.25
  289.          FontStrikethru  =   0   'False
  290.          FontUnderline   =   0   'False
  291.          Height          =   210
  292.          Index           =   1
  293.          Left            =   495
  294.          TabIndex        =   21
  295.          Top             =   555
  296.          Width           =   1110
  297.       End
  298.    End
  299.    Begin KNOB Knob1 
  300.       Angle           =   0
  301.       AutoRedraw      =   -1  'True
  302.       AVersion        =   2.5
  303.       BackgroundColor =   &H00C0C0C0&
  304.       BevelInner      =   2  ' 2 - Inset
  305.       BevelOuter      =   2  ' 2 - Inset
  306.       BevelWidth      =   2
  307.       BorderType      =   1  ' 1 - Bevel
  308.       BorderWidth     =   2
  309.       Digital         =   0   'False
  310.       DigitalColor    =   &H00000000&
  311.       DigitalDecimals =   0
  312.       DigitalFontID   =   0
  313.       DigitalX        =   0
  314.       DigitalY        =   0
  315.       FontID          =   0
  316.       FrameColor      =   &H00000000&
  317.       FrameScaleX     =   0
  318.       FrameScaleY     =   0
  319.       FrameStyle      =   0  ' 0 - None
  320.       Height          =   3690
  321.       KnobColor       =   &H000000C0&
  322.       KnobMultiTurn   =   0   'False
  323.       KnobMultiTurnValue=   0
  324.       KnobRadius      =   0.6
  325.       KnobSnap        =   0   'False
  326.       KnobSnapIncrement=   1
  327.       KnobStyle       =   2  ' 2 - Complex
  328.       KnobUserDefined =   ""
  329.       KnobValue       =   0
  330.       Left            =   45
  331.       MarkUserDefined =   ""
  332.       MouseControl    =   -1  'True
  333.       OutlineAlign    =   0  ' 0 - Left 
  334.       OutlineColor    =   &H00000000&
  335.       OutlineTitle    =   ""
  336.       OutlineWidth    =   0
  337.       Radius          =   0
  338.       TabIndex        =   15
  339.       Top             =   15
  340.       Value           =   0
  341.       Width           =   3810
  342.       XScale          =   0
  343.       YScale          =   0
  344.       ZLoad           =   KSCALES.FRX:0000
  345.    End
  346.    Begin Frame Frame2 
  347.       BackColor       =   &H00C0C0C0&
  348.       Caption         =   "ScaleDirection Property"
  349.       FontBold        =   -1  'True
  350.       FontItalic      =   0   'False
  351.       FontName        =   "Arial"
  352.       FontSize        =   8.25
  353.       FontStrikethru  =   0   'False
  354.       FontUnderline   =   0   'False
  355.       Height          =   855
  356.       Left            =   3930
  357.       TabIndex        =   12
  358.       Top             =   45
  359.       Width           =   2385
  360.       Begin OptionButton Option2 
  361.          BackColor       =   &H00C0C0C0&
  362.          Caption         =   "CounterClockwise"
  363.          FontBold        =   0   'False
  364.          FontItalic      =   0   'False
  365.          FontName        =   "Arial"
  366.          FontSize        =   8.25
  367.          FontStrikethru  =   0   'False
  368.          FontUnderline   =   0   'False
  369.          Height          =   225
  370.          Index           =   1
  371.          Left            =   210
  372.          TabIndex        =   14
  373.          TabStop         =   0   'False
  374.          Top             =   510
  375.          Width           =   1650
  376.       End
  377.       Begin OptionButton Option2 
  378.          BackColor       =   &H00C0C0C0&
  379.          Caption         =   "Clockwise"
  380.          FontBold        =   0   'False
  381.          FontItalic      =   0   'False
  382.          FontName        =   "Arial"
  383.          FontSize        =   8.25
  384.          FontStrikethru  =   0   'False
  385.          FontUnderline   =   0   'False
  386.          Height          =   225
  387.          Index           =   0
  388.          Left            =   210
  389.          TabIndex        =   13
  390.          Top             =   270
  391.          Value           =   -1  'True
  392.          Width           =   1350
  393.       End
  394.    End
  395. End
  396.  
  397. Sub Form_Load ()
  398.  
  399.     hscroll1(0) = knob1.ScaleMaxValue
  400.     hscroll1(1) = knob1.ScaleMinValue
  401.     hscroll1(2) = knob1.ScaleOriginX * 100
  402.     hscroll1(3) = knob1.ScaleOriginY * 100
  403.     hscroll1(4) = knob1.ScaleStartAngle
  404.     hscroll1(5) = knob1.ScaleStopAngle
  405.  
  406.     option2(knob1.ScaleDirection) = True
  407.  
  408. End Sub
  409.  
  410. Sub HScroll1_Change (Index As Integer)
  411.  
  412.     Select Case Index
  413.         Case 0
  414.             If (hscroll1(0) > knob1.ScaleMinValue) Then
  415.                 knob1.ScaleMaxValue = hscroll1(0)
  416.                 knob1.TicStopValue = knob1.ScaleMaxValue + .1
  417.             Else
  418.                 hscroll1(0) = knob1.ScaleMaxValue
  419.             End If
  420.             label2(0) = knob1.ScaleMaxValue
  421.         Case 1
  422.             If (hscroll1(1) < knob1.ScaleMaxValue) Then
  423.                 knob1.ScaleMinValue = hscroll1(1)
  424.                 knob1.TicStartValue = knob1.ScaleMinValue
  425.             Else
  426.                 hscroll1(1) = knob1.ScaleMinValue
  427.             End If
  428.             label2(1) = knob1.ScaleMinValue
  429.         Case 2
  430.             knob1.ScaleOriginX = hscroll1(2) / 100
  431.             label2(2) = hscroll1(2) / 100
  432.         Case 3
  433.             knob1.ScaleOriginY = hscroll1(3) / 100
  434.             label2(3) = hscroll1(3) / 100
  435.         Case 4
  436.             knob1.ScaleStartAngle = hscroll1(4)
  437.             label2(4) = hscroll1(4)
  438.         Case 5
  439.             knob1.ScaleStopAngle = hscroll1(5)
  440.             label2(5) = hscroll1(5)
  441.     End Select
  442.  
  443. End Sub
  444.  
  445. Sub HScroll1_Scroll (Index As Integer)
  446.  
  447.     Select Case Index
  448.         Case 0
  449.             If (hscroll1(0) > knob1.ScaleMinValue) Then
  450.                 knob1.ScaleMaxValue = hscroll1(0)
  451.                 knob1.TicStopValue = knob1.ScaleMaxValue + .1
  452.             Else
  453.                 hscroll1(0) = knob1.ScaleMaxValue
  454.             End If
  455.             label2(0) = knob1.ScaleMaxValue
  456.         Case 1
  457.             If (hscroll1(1) < knob1.ScaleMaxValue) Then
  458.                 knob1.ScaleMinValue = hscroll1(1)
  459.                  knob1.TicStartValue = knob1.ScaleMinValue
  460.             Else
  461.                 hscroll1(1) = knob1.ScaleMinValue
  462.             End If
  463.             label2(1) = knob1.ScaleMinValue
  464.         Case 2
  465.             knob1.ScaleOriginX = hscroll1(2) / 100
  466.             label2(2) = hscroll1(2) / 100
  467.         Case 3
  468.             knob1.ScaleOriginY = hscroll1(3) / 100
  469.             label2(3) = hscroll1(3) / 100
  470.         Case 4
  471.             knob1.ScaleStartAngle = hscroll1(4)
  472.             label2(4) = hscroll1(4)
  473.         Case 5
  474.             knob1.ScaleStopAngle = hscroll1(5)
  475.             label2(5) = hscroll1(5)
  476.     End Select
  477.  
  478. End Sub
  479.  
  480. Sub Option2_Click (Index As Integer)
  481.  
  482.     knob1.ScaleDirection = Index
  483.  
  484. End Sub
  485.  
  486.